package com.yupi.yupicturebackend.service;



import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.yupi.yupicturebackend.model.dto.space.SpaceAddRequest;
import com.yupi.yupicturebackend.model.dto.space.SpaceQueryRequest;
import com.yupi.yupicturebackend.model.entity.Picture;
import com.yupi.yupicturebackend.model.entity.Space;
import com.yupi.yupicturebackend.model.entity.User;
import com.yupi.yupicturebackend.model.vo.SpaceVO;

import javax.servlet.http.HttpServletRequest;
import java.io.IOException;
import java.util.List;

/**
* @author Y9000
* @description 针对表【space(空间)】的数据库操作Service
* @createDate 2025-09-23 18:48:46
*/
public interface SpaceService extends IService<Space> {


    //上传空间
//    SpaceVO uploadSpace(Object inputSource, SpaceUploadRequest SpaceUploadRequest, User loginUser) throws IOException;



    /**
     * 校验空间权限
     *
     * @param loginUser
     * @param space
     */

    void checkSpaceAuth(User loginUser, Space space);




    void validSpace(Space space,boolean add);

    /**
     * 根据空间级别填充空间对象
     *
     * @param space
     */
    void fillSpaceBySpaceLevel(Space space);


    long addSpace(SpaceAddRequest spaceAddRequest, User loginUser);

    /**
     * 获取查询对象
     *
     * @param spaceQueryRequest
     * @return
     */
    QueryWrapper<Space> getQueryWrapper(SpaceQueryRequest spaceQueryRequest);


    SpaceVO getSpaceVO(Space space, HttpServletRequest request);

    List<String> getPermissionList(Space space, User loginUser);

    Page<SpaceVO> getspaceVOPage(Page<Space> spacePage, HttpServletRequest request);
}

